<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Using the Triggers Tab</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Merged Version 1033" />
<meta name="description" content="Contains the online help topics for JMX Console Triggers Tab." />
<meta name="date" content="2014-12-17T12:26:7Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Java Mission Control JMX Console Triggers Tab Online Help, Release 5.5" />
<meta name="relnum" content="Release 5.5" />
<meta name="partnum" content="E21585-06" />
<meta name="docid" content="no_value_supplied" />
<link rel="copyright" href="./dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="stylesheet" href="./dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" />
<link rel="contents" href="toc.htm" title="Contents" type="text/html" />
<link rel="prev" href="olh.htm" title="Previous" type="text/html" />
</head>
<body>
<div class="zz-skip-header"><a href="#BEGIN">Skip Headers</a></div>
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="86%" />
<col width="*" />
<tr valign="bottom">
<td align="left"></td>
<td align="center"><a href="olh.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Previous</span></a>&nbsp;</td>
</tr>
</table>
<div class="sect1"><!-- infolevel="all" infotype="Reference" --><a id="sthref9" name="sthref9"></a>
<h1>Using the Triggers Tab</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>The <span class="bold">Triggers</span> tab allows you to manage rules that trigger events when a certain condition is met. This is useful for tracking runtime issues without having to constantly monitor the application.</p>
<p>The <span class="bold">Triggers</span> tab is divided into the following panels:</p>
<ul>
<li>
<p><span class="bold">Trigger Rules</span>: Lists all existing rules and lets you add, rename, delete, import, export rules, reset back to the default set of rules, activate and deactivate rules.</p>
</li>
<li>
<p><span class="bold">Rule Details</span>: When you select a rule, this panel displays the following subtabs:</p>
<ul>
<li>
<p><span class="bold">Condition</span>: Select the attribute and value on which the rule should trigger.</p>
</li>
<li>
<p><span class="bold">Action</span>: Select the event that should be triggered by the rule.</p>
</li>
<li>
<p><span class="bold">Constraints</span>: Select the time constraints for when the rule should be active.</p>
</li>
</ul>
</li>
</ul>
<div class="sect2"><!-- infotype="Task" --><a id="sthref10" name="sthref10"></a>
<h2>Working with Trigger Rules</h2>
<p>Rules displayed in grey are not available in the monitored JVM. By default, all rules are deactivated. To activate a rule, select the check box next to it.</p>
<p>To add a new trigger rule:</p>
<ol>
<li>
<p>Click <span class="gui-object-action">Add</span> on the <span class="bold">Trigger Rules</span> panel.</p>
</li>
<li>
<p>At the first step of the Add New Rule Wizard, select the attribute on which the rule should trigger. Click <span class="bold">Next</span>.</p>
</li>
<li>
<p>Set the condition on which the rule should trigger. This step contains the following settings:</p>
<ul>
<li>
<p><span class="bold">Max trigger value</span> (for numeric attributes) or <span class="bold">Match string</span> (for non-numeric attributes): Specify the maximum value or the matching string for the selected attribute for which the rule should trigger.</p>
</li>
<li>
<p><span class="bold">Sustained time</span>: Specify the duration (in seconds) for which the condition must stay true before the rule is triggered.</p>
</li>
<li>
<p><span class="bold">Limit period</span>: Specify the minimum amount of time (in seconds) that should pass before the rule can be triggered subsequently.</p>
</li>
<li>
<p><span class="bold">Trigger when condition is met</span>: Select whether to trigger the rule when the condition is met. For example, if the trigger value is set to 100, the rule will be triggered when the value changes from less than 100 to 100 or more.</p>
</li>
<li>
<p><span class="bold">Trigger when recovering from condition</span>: Select whether to trigger the rule when the condition is no longer met. For example, if the trigger value is set to 100, the rule will be triggered when the value changes from 100 or more to less than 100.</p>
</li>
</ul>
<p>Click <span class="gui-object-action">Next</span>.</p>
</li>
<li>
<p>Select the action you want to occur when the rule triggers. Depending on the action, you may have to provide additional data. The following actions are available:</p>
<ul>
<li>
<p><span class="bold">Application Alert</span>: Displays an alert dialog in Java Mission Control.</p>
</li>
<li>
<p><span class="bold">Console Output</span>: Sends a notification to the standard output (<span class="italic">stdout</span>) of the console (command prompt) from which the JMX Console was started.</p>
</li>
<li>
<p><span class="bold">Dump Flight Recording</span>: Dumps whatever data is available in a flight recording for the last specified time period (in seconds) to a JFR file.</p>
</li>
<li>
<p><span class="bold">HPROF Dump</span>: Initiates a memory dump to the specified HPROF file.</p>
</li>
<li>
<p><span class="bold">Invoke Diagnostic Command</span>: Invokes the specified diagnostic command and logs output to the specified LOG file by appending or overwriting the results.</p>
</li>
<li>
<p><span class="bold">Log to file</span>: Writes a notification to the specified TXT log file.</p>
</li>
<li>
<p><span class="bold">Send Email</span>: Sends a notification by email. You can configure the SMTP server address and port, the recipients and sender for the email, and provide SSL credentials if secure connection is necessary.</p>
</li>
<li>
<p><span class="bold">Start Continuous Flight Recording</span>: Starts a continuous flight recording.</p>
</li>
<li>
<p><span class="bold">Start Time Limited Flight Recording</span>: Starts a flight recording that will dump the results to a JFR file after the specified time period (in seconds).</p>
</li>
</ul>
<p>Click <span class="bold">Next</span> to continue, or <span class="bold">Finish</span> to add the rule as it is.</p>
</li>
<li>
<p>(Optional) Select the time constraints if you want the rule to be active only on specific dates, days of the week, or time of day. Click <span class="bold">Next</span>.</p>
</li>
<li>
<p>(Optional) Select the group to which the rule should belong to or specify a new group. Specify the name for the rule and a detailed description.</p>
<p>You can go back to any previous step in the wizard to modify any of the settings. Click <span class="bold">Finish</span> to add the rule to the list.</p>
</li>
</ol>
<p>To edit a rule, select it in the <span class="bold">Trigger Rules</span> panel. The <span class="bold">Rule Details</span> panel to the right displays three subtabs with the attribute and value on which the rule should trigger, action that is triggered by the rule, and time constraints for when you want the rule to be active.</p>
<p>To rename a rule, select it in the <span class="bold">Trigger Rules</span> panel and click <span class="bold">Rename</span>. Then provide a new name for the rule and click <span class="bold">OK</span>.</p>
<p>If you do not want the rule to trigger, you can deactivate it by deselecting the check box near the rule in the <span class="bold">Trigger Rules</span> panel. However, if you are sure you will never use the rule again, you can remove it from the list completely by selecting it and clicking <span class="bold">Delete</span>.</p>
<p>To export a set of rules to an XML file, click <span class="bold">Export</span> in the <span class="bold">Trigger Rules</span> panel. Then select the rules you want to export, specify the file name, and click <span class="bold">OK</span>. To import a set of rules from an XML file, click <span class="bold">Import</span> in the <span class="bold">Trigger Rules</span> panel, select the file and click <span class="bold">OK</span>.</p>
<p>To reset back to the default set of rules, click <span class="bold">Reset</span> in the <span class="bold">Trigger Rules</span> panel and confirm. This will overwrite all the rules and replace them with the default set.</p>
</div>
<!-- class="sect2" -->
<div class="sect2"><!-- infotype="Tutorial" --><a id="sthref11" name="sthref11"></a>
<h2>Viewing Application Alerts</h2>
<p>Every time an active rule with the <span class="bold">Application Alert</span> action is triggered, the corresponding alert is added to the Trigger Alerts window. The list of triggered application alerts is reset every time you restart Java Mission Control.</p>
<p>To open the Trigger Alerts window, do one of the following:</p>
<ul>
<li>
<p>Open the <span class="gui-object-action">Window</span> menu and select <span class="gui-object-action">Alerts</span>.</p>
</li>
<li>
<p>Connect the JMX Console to any JVM, open the <span class="bold">Triggers</span> tab, and click <span class="gui-object-action">Alerts</span>.</p>
</li>
</ul>
<p>The Trigger Alerts window lists all application alerts that have been triggered for a JVM since Java Mission Control was started and connected to the JVM. The list of alerts contains the following columns:</p>
<ul>
<li>
<p><span class="bold">Date</span>: The date when the alert was triggered.</p>
</li>
<li>
<p><span class="bold">Time</span>: The time when the alert was triggered.</p>
</li>
<li>
<p><span class="bold">Rule</span>: The name of the rule that triggered the alert.</p>
</li>
<li>
<p><span class="bold">Source</span>: The name of the JVM connection for which the alert was triggered as displayed in the JVM Browser. For remote JVM connections, this field contains the IP address and port number.</p>
</li>
</ul>
<p>When you select an alert in the list, its details are displayed in the field under the list. Different information is displayed depending on the selected action event.</p>
<p>Use the <span class="bold">Show dialog on alerts</span> check box to toggle whether you want the Trigger Alerts window to open whenever an application alert is triggered.</p>
<p>To clear the list of triggered application alerts, click <span class="bold">Clear</span>. Alternatively, the list is cleared whenever you restart Java Mission Control.</p>
</div>
<!-- class="sect2" --></div>
<!-- class="sect1" -->
<!-- class="chapter" -->
<!-- Start Footer -->
<div class="footer">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="86%" />
<col width="*" />
<tr>
<td align="left"><a href="./dcommon/html/cpyr.htm"><span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;1999, 2015,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span></a></td>
<td align="center"><a href="olh.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Previous</span></a>&nbsp;</td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
</html>
